<?php

class Core_Backend_Component_Foundation_View_Industry_Index extends Core_Backend_Share_View_Grid {
	
	protected function initialize(){
		parent::initialize();
		$this->setTemplatePath('index');
	}

    protected function buildGrid($grid) {
        $grid->setId('industry_grid')->setPrimaryKey('id');
        $grid->addLabelColumn($this->__('share.label.code'), 'code', '{id}')
             ->setWidth(200);
        $grid->addLabelColumn($this->__('share.label.name'), 'name', '{industry_{id}}');
//        $grid->addLabelColumn($this->__('foundation.label.ritu_industry_code'), 'ritu_code', '{ritu_code}');
//        $grid->addLinkColumn('#', 'edit', $this->getUrl(array('id' => '{id}'), 'edit'), $this->__('share.button.edit'))
//                ->setWidth(40)
//                ->setAlign('center');
        $grid->setDataSource($this->getList()->toArray());
        parent::buildGrid($grid);
    }

    protected function buildPagination($pagination) {
        parent::buildPagination($pagination);
        $pagination->setUrlFormat($this->getPaginationUrl())
                ->setRecordCount($this->getRecords());
    }
}